﻿/*
 * NormalVector
 * 
 * initial implementation : 31.8.2007
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see Petra.Gis.License.txt
 */
using System;
using System.Collections.Generic;
//using System.Text;
//using Petra.Gis.Geometry;

namespace Petra.Gis.Geometry.Support
{

  /// <summary>
  /// arc and text point specific readwrite vector 
  /// to store 3d orientation vector
  /// </summary>
  public unsafe class NormalVector : Vector
  {
    //internal double dI, dJ, dK;


    
    internal NormalVector()
    {

    }



    public NormalVector(double I, double J, double K)
    {

      //todo: validate if size == 1

      dI = I;
      dJ = J;
      dK = K;
    }




    public NormalVector(ref byte[] vData, int BeginOfCoords)
    {
      fixed (byte* beginCoord = &vData[BeginOfCoords])
      {
        double* tmpPtr = (double*)beginCoord;
        dI = *tmpPtr++;
        dJ = *tmpPtr++;
        dK = *tmpPtr;
      }
    }



    //public double I { get { return dI; } set { dI = value; } }
    //public double J { get { return dJ; } set { dI = value; } }
    //public double K { get { return dK; } set { dI = value; } }
  }
}
